
/**
 * 表格列表查询接口的数据返回模板
 * @param {*} data 前端表格界面需要的数据
 * @returns 
 */
function respondTableOk(data) {
    return{
        "success": true,
        "message": "查询成功",
        "code": 200,
        "result": {
            "records": data,
            "total": 1,
            "size": 10,
            "current": 1,
            "orders": [],
            "optimizeCountSql": true,
            "hitCount": false,
            "countId": null,
            "maxLimit": null,
            "searchCount": true,
            "pages": 1
        },
        "timestamp": Date.parse(new Date)
    }
}

/**
 * 前端操作的接口返回模板
 * @param {*} data 南京接口返回的数据
 * @returns 
 */
function respondOk(data) {
    return{
        "success": true,
        "message": "操作成功",
        "code": 200,
        "result": data,
        "timestamp": Date.parse(new Date)
    }
}
module.exports ={ 
    respondTableOk,
    respondOk,
}